Optimal. Leaf size=240 \[ -\frac {\left (a e^2 (3 C d+B e)-c d \left (C d^2+3 e (B d+A e)\right )\right ) x}{c^2}-\frac {e \left (a C e^2-c \left (3 C d^2+e (3 B d+A e)\right )\right ) x^2}{2 c^2}+\frac {e^2 (3 C d+B e) x^3}{3 c}+\frac {C e^3 x^4}{4 c}+\frac {\left (A c d \left (c d^2-3 a e^2\right )+a \left (a e^2 (3 C d+B e)-c d^2 (C d+3 B e)\right )\right ) \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{\sqrt {a} c^{5/2}}+\frac {\left (B c d \left (c d^2-3 a e^2\right )+(A c-a C) e \left (3 c d^2-a e^2\right )\right ) \log \left (a+c x^2\right )}{2 c^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.25, antiderivative size = 237, normalized size of antiderivative = 0.99, number of steps
used = 5, number of rules used = 4, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {1643, 649, 211,
266} \begin {gather*} \frac {\text {ArcTan}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right ) \left (A c d \left (c d^2-3 a e^2\right )+a \left (a e^2 (B e+3 C d)-c d^2 (3 B e+C d)\right )\right )}{\sqrt {a} c^{5/2}}+\frac {\log \left (a+c x^2\right ) \left (e (A c-a C) \left (3 c d^2-a e^2\right )+B c d \left (c d^2-3 a e^2\right )\right )}{2 c^3}+\frac {x \left (-a e^2 (B e+3 C d)+3 c d e (A e+B d)+c C d^3\right )}{c^2}+\frac {e x^2 \left (-a C e^2+c e (A e+3 B d)+3 c C d^2\right )}{2 c^2}+\frac {e^2 x^3 (B e+3 C d)}{3 c}+\frac {C e^3 x^4}{4 c} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 266
Rule 649
Rule 1643
Rubi steps
\begin {align*} \int \frac {(d+e x)^3 \left (A+B x+C x^2\right )}{a+c x^2} \, dx &=\int \left (\frac {c C d^3+3 c d e (B d+A e)-a e^2 (3 C d+B e)}{c^2}+\frac {e \left (3 c C d^2-a C e^2+c e (3 B d+A e)\right ) x}{c^2}+\frac {e^2 (3 C d+B e) x^2}{c}+\frac {C e^3 x^3}{c}+\frac {A c d \left (c d^2-3 a e^2\right )+a \left (a e^2 (3 C d+B e)-c d^2 (C d+3 B e)\right )+\left (B c d \left (c d^2-3 a e^2\right )+(A c-a C) e \left (3 c d^2-a e^2\right )\right ) x}{c^2 \left (a+c x^2\right )}\right ) \, dx\\ &=\frac {\left (c C d^3+3 c d e (B d+A e)-a e^2 (3 C d+B e)\right ) x}{c^2}+\frac {e \left (3 c C d^2-a C e^2+c e (3 B d+A e)\right ) x^2}{2 c^2}+\frac {e^2 (3 C d+B e) x^3}{3 c}+\frac {C e^3 x^4}{4 c}+\frac {\int \frac {A c d \left (c d^2-3 a e^2\right )+a \left (a e^2 (3 C d+B e)-c d^2 (C d+3 B e)\right )+\left (B c d \left (c d^2-3 a e^2\right )+(A c-a C) e \left (3 c d^2-a e^2\right )\right ) x}{a+c x^2} \, dx}{c^2}\\ &=\frac {\left (c C d^3+3 c d e (B d+A e)-a e^2 (3 C d+B e)\right ) x}{c^2}+\frac {e \left (3 c C d^2-a C e^2+c e (3 B d+A e)\right ) x^2}{2 c^2}+\frac {e^2 (3 C d+B e) x^3}{3 c}+\frac {C e^3 x^4}{4 c}+\frac {\left (B c d \left (c d^2-3 a e^2\right )+(A c-a C) e \left (3 c d^2-a e^2\right )\right ) \int \frac {x}{a+c x^2} \, dx}{c^2}+\frac {\left (A c d \left (c d^2-3 a e^2\right )+a \left (a e^2 (3 C d+B e)-c d^2 (C d+3 B e)\right )\right ) \int \frac {1}{a+c x^2} \, dx}{c^2}\\ &=\frac {\left (c C d^3+3 c d e (B d+A e)-a e^2 (3 C d+B e)\right ) x}{c^2}+\frac {e \left (3 c C d^2-a C e^2+c e (3 B d+A e)\right ) x^2}{2 c^2}+\frac {e^2 (3 C d+B e) x^3}{3 c}+\frac {C e^3 x^4}{4 c}+\frac {\left (A c d \left (c d^2-3 a e^2\right )+a \left (a e^2 (3 C d+B e)-c d^2 (C d+3 B e)\right )\right ) \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{\sqrt {a} c^{5/2}}+\frac {\left (B c d \left (c d^2-3 a e^2\right )+(A c-a C) e \left (3 c d^2-a e^2\right )\right ) \log \left (a+c x^2\right )}{2 c^3}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.15, size = 223, normalized size = 0.93 \begin {gather*} \frac {\left (A c d \left (c d^2-3 a e^2\right )+a \left (a e^2 (3 C d+B e)-c d^2 (C d+3 B e)\right )\right ) \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{\sqrt {a} c^{5/2}}+\frac {c x \left (-6 a e^2 (6 C d+2 B e+C e x)+3 c C \left (4 d^3+6 d^2 e x+4 d e^2 x^2+e^3 x^3\right )+2 c e \left (3 A e (6 d+e x)+B \left (18 d^2+9 d e x+2 e^2 x^2\right )\right )\right )+6 \left (B c d \left (c d^2-3 a e^2\right )+(A c-a C) e \left (3 c d^2-a e^2\right )\right ) \log \left (a+c x^2\right )}{12 c^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.13, size = 260, normalized size = 1.08
method | result | size |
default | \(\frac {\frac {1}{4} c C \,x^{4} e^{3}+\frac {1}{3} B c \,e^{3} x^{3}+C c d \,e^{2} x^{3}+\frac {1}{2} A c \,e^{3} x^{2}+\frac {3}{2} B c d \,e^{2} x^{2}-\frac {1}{2} C a \,e^{3} x^{2}+\frac {3}{2} C c \,d^{2} e \,x^{2}+3 A c d \,e^{2} x -B a \,e^{3} x +3 B c \,d^{2} e x -3 C a d \,e^{2} x +C c \,d^{3} x}{c^{2}}+\frac {\frac {\left (-A a c \,e^{3}+3 A \,c^{2} d^{2} e -3 B a c d \,e^{2}+B \,c^{2} d^{3}+C \,a^{2} e^{3}-3 C a c \,d^{2} e \right ) \ln \left (c \,x^{2}+a \right )}{2 c}+\frac {\left (-3 A a c d \,e^{2}+A \,c^{2} d^{3}+B \,a^{2} e^{3}-3 B a c \,d^{2} e +3 C \,a^{2} d \,e^{2}-C a c \,d^{3}\right ) \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {a c}}}{c^{2}}\) | \(260\) |
risch | \(\text {Expression too large to display}\) | \(2166\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.50, size = 242, normalized size = 1.01 \begin {gather*} -\frac {{\left (3 \, B a c d^{2} e + {\left (C a c - A c^{2}\right )} d^{3} - B a^{2} e^{3} - 3 \, {\left (C a^{2} e^{2} - A a c e^{2}\right )} d\right )} \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {a c} c^{2}} + \frac {3 \, C c x^{4} e^{3} + 4 \, {\left (3 \, C c d e^{2} + B c e^{3}\right )} x^{3} + 6 \, {\left (3 \, C c d^{2} e + 3 \, B c d e^{2} - C a e^{3} + A c e^{3}\right )} x^{2} + 12 \, {\left (C c d^{3} + 3 \, B c d^{2} e - B a e^{3} - 3 \, {\left (C a e^{2} - A c e^{2}\right )} d\right )} x}{12 \, c^{2}} + \frac {{\left (B c^{2} d^{3} - 3 \, B a c d e^{2} + C a^{2} e^{3} - A a c e^{3} - 3 \, {\left (C a c e - A c^{2} e\right )} d^{2}\right )} \log \left (c x^{2} + a\right )}{2 \, c^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.38, size = 578, normalized size = 2.41 \begin {gather*} \left [\frac {12 \, C a c^{2} d^{3} x + 6 \, {\left (3 \, B a c d^{2} e + {\left (C a c - A c^{2}\right )} d^{3} - B a^{2} e^{3} - 3 \, {\left (C a^{2} - A a c\right )} d e^{2}\right )} \sqrt {-a c} \log \left (\frac {c x^{2} - 2 \, \sqrt {-a c} x - a}{c x^{2} + a}\right ) + {\left (3 \, C a c^{2} x^{4} + 4 \, B a c^{2} x^{3} - 12 \, B a^{2} c x - 6 \, {\left (C a^{2} c - A a c^{2}\right )} x^{2}\right )} e^{3} + 6 \, {\left (2 \, C a c^{2} d x^{3} + 3 \, B a c^{2} d x^{2} - 6 \, {\left (C a^{2} c - A a c^{2}\right )} d x\right )} e^{2} + 18 \, {\left (C a c^{2} d^{2} x^{2} + 2 \, B a c^{2} d^{2} x\right )} e + 6 \, {\left (B a c^{2} d^{3} - 3 \, B a^{2} c d e^{2} - 3 \, {\left (C a^{2} c - A a c^{2}\right )} d^{2} e + {\left (C a^{3} - A a^{2} c\right )} e^{3}\right )} \log \left (c x^{2} + a\right )}{12 \, a c^{3}}, \frac {12 \, C a c^{2} d^{3} x - 12 \, {\left (3 \, B a c d^{2} e + {\left (C a c - A c^{2}\right )} d^{3} - B a^{2} e^{3} - 3 \, {\left (C a^{2} - A a c\right )} d e^{2}\right )} \sqrt {a c} \arctan \left (\frac {\sqrt {a c} x}{a}\right ) + {\left (3 \, C a c^{2} x^{4} + 4 \, B a c^{2} x^{3} - 12 \, B a^{2} c x - 6 \, {\left (C a^{2} c - A a c^{2}\right )} x^{2}\right )} e^{3} + 6 \, {\left (2 \, C a c^{2} d x^{3} + 3 \, B a c^{2} d x^{2} - 6 \, {\left (C a^{2} c - A a c^{2}\right )} d x\right )} e^{2} + 18 \, {\left (C a c^{2} d^{2} x^{2} + 2 \, B a c^{2} d^{2} x\right )} e + 6 \, {\left (B a c^{2} d^{3} - 3 \, B a^{2} c d e^{2} - 3 \, {\left (C a^{2} c - A a c^{2}\right )} d^{2} e + {\left (C a^{3} - A a^{2} c\right )} e^{3}\right )} \log \left (c x^{2} + a\right )}{12 \, a c^{3}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 1008 vs.
\(2 (224) = 448\).
time = 5.81, size = 1008, normalized size = 4.20 \begin {gather*} \frac {C e^{3} x^{4}}{4 c} + x^{3} \left (\frac {B e^{3}}{3 c} + \frac {C d e^{2}}{c}\right ) + x^{2} \left (\frac {A e^{3}}{2 c} + \frac {3 B d e^{2}}{2 c} - \frac {C a e^{3}}{2 c^{2}} + \frac {3 C d^{2} e}{2 c}\right ) + x \left (\frac {3 A d e^{2}}{c} - \frac {B a e^{3}}{c^{2}} + \frac {3 B d^{2} e}{c} - \frac {3 C a d e^{2}}{c^{2}} + \frac {C d^{3}}{c}\right ) + \left (\frac {- A a c e^{3} + 3 A c^{2} d^{2} e - 3 B a c d e^{2} + B c^{2} d^{3} + C a^{2} e^{3} - 3 C a c d^{2} e}{2 c^{3}} - \frac {\sqrt {- a c^{7}} \left (- 3 A a c d e^{2} + A c^{2} d^{3} + B a^{2} e^{3} - 3 B a c d^{2} e + 3 C a^{2} d e^{2} - C a c d^{3}\right )}{2 a c^{6}}\right ) \log {\left (x + \frac {A a^{2} c e^{3} - 3 A a c^{2} d^{2} e + 3 B a^{2} c d e^{2} - B a c^{2} d^{3} - C a^{3} e^{3} + 3 C a^{2} c d^{2} e + 2 a c^{3} \left (\frac {- A a c e^{3} + 3 A c^{2} d^{2} e - 3 B a c d e^{2} + B c^{2} d^{3} + C a^{2} e^{3} - 3 C a c d^{2} e}{2 c^{3}} - \frac {\sqrt {- a c^{7}} \left (- 3 A a c d e^{2} + A c^{2} d^{3} + B a^{2} e^{3} - 3 B a c d^{2} e + 3 C a^{2} d e^{2} - C a c d^{3}\right )}{2 a c^{6}}\right )}{- 3 A a c^{2} d e^{2} + A c^{3} d^{3} + B a^{2} c e^{3} - 3 B a c^{2} d^{2} e + 3 C a^{2} c d e^{2} - C a c^{2} d^{3}} \right )} + \left (\frac {- A a c e^{3} + 3 A c^{2} d^{2} e - 3 B a c d e^{2} + B c^{2} d^{3} + C a^{2} e^{3} - 3 C a c d^{2} e}{2 c^{3}} + \frac {\sqrt {- a c^{7}} \left (- 3 A a c d e^{2} + A c^{2} d^{3} + B a^{2} e^{3} - 3 B a c d^{2} e + 3 C a^{2} d e^{2} - C a c d^{3}\right )}{2 a c^{6}}\right ) \log {\left (x + \frac {A a^{2} c e^{3} - 3 A a c^{2} d^{2} e + 3 B a^{2} c d e^{2} - B a c^{2} d^{3} - C a^{3} e^{3} + 3 C a^{2} c d^{2} e + 2 a c^{3} \left (\frac {- A a c e^{3} + 3 A c^{2} d^{2} e - 3 B a c d e^{2} + B c^{2} d^{3} + C a^{2} e^{3} - 3 C a c d^{2} e}{2 c^{3}} + \frac {\sqrt {- a c^{7}} \left (- 3 A a c d e^{2} + A c^{2} d^{3} + B a^{2} e^{3} - 3 B a c d^{2} e + 3 C a^{2} d e^{2} - C a c d^{3}\right )}{2 a c^{6}}\right )}{- 3 A a c^{2} d e^{2} + A c^{3} d^{3} + B a^{2} c e^{3} - 3 B a c^{2} d^{2} e + 3 C a^{2} c d e^{2} - C a c^{2} d^{3}} \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 3.43, size = 279, normalized size = 1.16 \begin {gather*} -\frac {{\left (C a c d^{3} - A c^{2} d^{3} + 3 \, B a c d^{2} e - 3 \, C a^{2} d e^{2} + 3 \, A a c d e^{2} - B a^{2} e^{3}\right )} \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {a c} c^{2}} + \frac {{\left (B c^{2} d^{3} - 3 \, C a c d^{2} e + 3 \, A c^{2} d^{2} e - 3 \, B a c d e^{2} + C a^{2} e^{3} - A a c e^{3}\right )} \log \left (c x^{2} + a\right )}{2 \, c^{3}} + \frac {3 \, C c^{3} x^{4} e^{3} + 12 \, C c^{3} d x^{3} e^{2} + 18 \, C c^{3} d^{2} x^{2} e + 12 \, C c^{3} d^{3} x + 4 \, B c^{3} x^{3} e^{3} + 18 \, B c^{3} d x^{2} e^{2} + 36 \, B c^{3} d^{2} x e - 6 \, C a c^{2} x^{2} e^{3} + 6 \, A c^{3} x^{2} e^{3} - 36 \, C a c^{2} d x e^{2} + 36 \, A c^{3} d x e^{2} - 12 \, B a c^{2} x e^{3}}{12 \, c^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.99, size = 277, normalized size = 1.15 \begin {gather*} x^2\,\left (\frac {3\,C\,d^2\,e+3\,B\,d\,e^2+A\,e^3}{2\,c}-\frac {C\,a\,e^3}{2\,c^2}\right )+x\,\left (\frac {C\,d^3+3\,B\,d^2\,e+3\,A\,d\,e^2}{c}-\frac {a\,\left (B\,e^3+3\,C\,d\,e^2\right )}{c^2}\right )+\frac {x^3\,\left (B\,e^3+3\,C\,d\,e^2\right )}{3\,c}+\frac {C\,e^3\,x^4}{4\,c}+\frac {\mathrm {atan}\left (\frac {\sqrt {c}\,x}{\sqrt {a}}\right )\,\left (3\,C\,a^2\,d\,e^2+B\,a^2\,e^3-C\,a\,c\,d^3-3\,B\,a\,c\,d^2\,e-3\,A\,a\,c\,d\,e^2+A\,c^2\,d^3\right )}{\sqrt {a}\,c^{5/2}}+\frac {\ln \left (c\,x^2+a\right )\,\left (4\,C\,a^3\,c^3\,e^3-12\,C\,a^2\,c^4\,d^2\,e-12\,B\,a^2\,c^4\,d\,e^2-4\,A\,a^2\,c^4\,e^3+4\,B\,a\,c^5\,d^3+12\,A\,a\,c^5\,d^2\,e\right )}{8\,a\,c^6} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________